package com.zlp.demo;

import com.sms.zlp.cofig.EnableSms;
import com.sms.zlp.service.impl.AliyunSmsSenderImpl;
import com.sms.zlp.service.impl.TencentSmsSenderImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
//@EnableSms
public class App {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext =  SpringApplication.run(App.class,args);

        AliyunSmsSenderImpl aliyunSmsSender = applicationContext.getBean(AliyunSmsSenderImpl.class);
        aliyunSmsSender.send("用阿里云发送短信");
        TencentSmsSenderImpl tencentSmsSender = applicationContext.getBean(TencentSmsSenderImpl.class);
        tencentSmsSender.send("用腾讯云发送短信");
    }
}
